import request from '@/utils/myrequest'

export function getList(kvs) {
  return request({
    url: 'config/usergroup/getlist',
    method: 'get',
    kvs
  })
}

export function get(kvs) {
  return request({
    url: 'config/usergroup/get',
    method: 'get',
    kvs
  })
}

export function add(kvs) {
  return request({
    url: 'config/usergroup/add',
    method: 'post',
    kvs
  })
}

export function del(kvs) {
  return request({
    url: 'config/usergroup/delete',
    method: 'post',
    kvs
  })
}

export function edit(kvs) {
  return request({
    url: 'config/usergroup/update',
    method: 'post',
    kvs
  })
}

export function getUserGroups(kvs) {
  return request({
    url: 'config/usergroup/getGroupUsers',
    method: 'get',
    kvs
  })
}

export function getAllUserGroups() {
  return request({
    url: 'config/usergroup/getAllUserGroups',
    method: 'get'
  })
}
export function getUserIdGroups(kvs) {
  return request({
    url: '/config/user/GetUsersByDeptId',
    method: 'get',
    kvs
  })
}

export default { getList, add, edit, del, get, getUserGroups, getAllUserGroups }
